import { ENUM_TON_NOTCH, ENUM_TON_ORDER, NumberTransOption } from "qqlx-core";

export const MAP_ENUM_TON_ORDER = new Map<ENUM_TON_ORDER, NumberTransOption>();
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.NONE, { value: ENUM_TON_ORDER.NONE, zh: "无" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.PURCHASE, { value: ENUM_TON_ORDER.PURCHASE, zh: "商品采购" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.PURCHASE_IN, { value: ENUM_TON_ORDER.PURCHASE_IN, zh: "采购入库" });

MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.ADJUST, { value: ENUM_TON_ORDER.ADJUST, zh: "库存调整" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.PROCESS, { value: ENUM_TON_ORDER.PROCESS, zh: "商品加工" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.PLAN_PROCESS_MATERIAL, { value: ENUM_TON_ORDER.PLAN_PROCESS_MATERIAL, zh: "材料估算" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.PROCESS_MATERIAL, { value: ENUM_TON_ORDER.PROCESS_MATERIAL, zh: "材料耗损" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.PROCESS_IN, { value: ENUM_TON_ORDER.PROCESS_IN, zh: "加工入库" });

MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.SALE, { value: ENUM_TON_ORDER.SALE, zh: "商品销售" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.SALE_OUT, { value: ENUM_TON_ORDER.SALE_OUT, zh: "销售发货" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.PLAN_SALE_OUT, { value: ENUM_TON_ORDER.PLAN_SALE_OUT, zh: "商品预售" });

MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.SALE_RETURN, { value: ENUM_TON_ORDER.SALE_RETURN, zh: "销售退货" });
MAP_ENUM_TON_ORDER.set(ENUM_TON_ORDER.SALE_RETURN_IN, { value: ENUM_TON_ORDER.SALE_RETURN_IN, zh: "销售退货入库" });

export function getTonOrderTrans(code: ENUM_TON_ORDER) {
  return MAP_ENUM_TON_ORDER.get(code);
}

export const MAP_ENUM_TON_NOTCH = new Map<ENUM_TON_NOTCH, NumberTransOption>();
MAP_ENUM_TON_NOTCH.set(ENUM_TON_NOTCH.NONE, { value: ENUM_TON_NOTCH.NONE, zh: "无" });
MAP_ENUM_TON_NOTCH.set(ENUM_TON_NOTCH.IN_OUT, { value: ENUM_TON_NOTCH.IN_OUT, zh: "在库" });
MAP_ENUM_TON_NOTCH.set(ENUM_TON_NOTCH.NOT_IN, { value: ENUM_TON_NOTCH.NOT_IN, zh: "未入库" });
MAP_ENUM_TON_NOTCH.set(ENUM_TON_NOTCH.NOT_PROCESS, { value: ENUM_TON_NOTCH.NOT_PROCESS, zh: "等待加工" });
MAP_ENUM_TON_NOTCH.set(ENUM_TON_NOTCH.NOT_OUT, { value: ENUM_TON_NOTCH.NOT_OUT, zh: "未发货" });

export function getTonNotchTrans(code: ENUM_TON_NOTCH) {
  return MAP_ENUM_TON_NOTCH.get(code);
}
